@leftPadding: 10px; //左右边距
@topPadding: 10px; //上下边距
@import url("iconfont.css");


.search-base-btn {
    width: 74px;
    line-height: 32px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
    margin-right: 20px;

    &:last-of-type {
        margin-right: 0
    }

    &:first-of-type {
        margin-left: auto;
    }
}

//通用-基础表格body函数
.base-body {
    font-size: 14px;

    .base-btn {
        width: 56px;
        line-height: 24px;
        border-radius: 2px;
        display: inline-block;
        text-align: center;
        background: rgb(242, 121, 27);
        color: #fff;
        margin-right: 10px;
        cursor: pointer;
        font-size: 12px;

        &:last-of-type {
            margin-right: 0
        }
    }

    //基础图标样式函数
    .base-img {
        width: 15px;
        height: 15px;
        display: inline-block;
        position: relative;
        top: 2px;
        margin-right: 2px;
        background-size: 100% 100%;
    }

    .edit-btn {
        .base-btn();
        background: #05B92F;

        .btn-img {
            background-image: url(../img/esTable/edit.png);
            .base-img();
        }

    }

    .delete-btn {
        .base-btn();
        background: #EA5757;

        .btn-img {
            background-image: url(../img/esTable/delete.png);
            .base-img();
        }
    }

    .detail-btn {
        .base-btn();
        color: #1F1F1F;
        background: #FBFBFB;
        border: 1px solid #DADADA;
        box-sizing: border-box;
        line-height: 22px;

        .btn-img {
            background-image: url(../img/esTable/detail.png);
            .base-img();
        }
    }

    .export-btn {
        .base-btn();

        .btn-img {
            background-image: url(../img/esTable/export.png);
            .base-img();
        }
    }

    .download-btn {
        .base-btn();
        width: auto;
        padding: 0px 5px;
        line-height: 22px;
        background: #0066FF;
        border-radius: 2px;

        .btn-img {
            background-image: url(../img/esTable/download.png);
            .base-img();
        }
    }

    .play-btn {
        .base-btn();
        width: auto;
        padding: 0px 5px;
        color: #1F1F1F;
        background: #FBFBFB;
        border: 1px solid #DADADA;
        box-sizing: border-box;
        line-height: 22px;
        border-radius: 2px;

        .btn-img {
            background-image: url(../img/esTable/play.png);
            .base-img();
        }
    }

    .deal-btn {
        .base-btn();
        width: unset;
        min-width: 56px;
        padding: 0 6px;
        background: #0066FF;

        .btn-img {
            background-image: url(../img/esTable/deal.png);
            .base-img();
        }
    }

    //其他样式
    .other-btn {
        .base-btn();
        width: unset;
        min-width: 56px;
        padding: 0 6px;
        background: #0066FF;

        &:nth-of-type(2n-1) {
            color: #1F1F1F;
            background: #FBFBFB;
            border: 1px solid #DADADA;
            box-sizing: border-box;
            line-height: 22px;
        }
    }
}

//查询、添加按钮等样式函数
.search-base-img {
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
    top: 3px;
    margin-right: 8px;
    background-size: 100% 100%;
}

// 1.纯表格页面
.tablePage {
    border: @topPadding rgb(242, 243, 245) solid;
    border-left-width: 10px;
    border-right-width: 10px;
    background-color: #fff;
    font-family: 'PingFang SC';
    position: relative;
    box-sizing: border-box;
    height: 100%;
    border-radius: 6px;

    //标签页
    .my-tabs {
        .el-tabs__item {
            padding: 0 20px !important;
        }
    }

    //按钮集合
    .btn-collection {

        .table-toggle {
            color: #0066ff;
            font-size: 20px;
            margin-left: 20px;
        }

        // 查询栏中的多行分行
        .block-search-dom {
            margin-top: 15px;
            display: flex;
            width: 100%;
            align-items: center;
        }

        .header-query {
            display: inline-flex;
            align-items: center;
        }

        // 查询字段名称
        .search-text {
            font-style: normal;
            font-weight: 500;
            font-size: 14px;
            width: 90px;
            color: #424242;
            display: inline-block;
            margin-right: 10px;
            text-align: right;

            // 如果是下拉选择查询字段名称，则修改样式
            .el-input__inner {
                border: 0;
                padding: 0 10px;
                font-size: 14px;
            }
        }

        // 查询条件输入框的样式
        .search-input {
            width: 200px;
            margin-right: 20px;
            height: 32px;
            display: inline-flex;
            //并联关系
            &.datedateTime-picker{
                width: 360px;
            }
        }



        .time-picker {
            width: 250px;
        }

        .dateTime-picker {
            width: 350px;
        }

        // 查询按钮,批量导出按钮
        .search-btn {
            border-radius: 2px;
            background: #0066FF;
            color: #fff;
            .search-base-btn();

            .btn-img {
                background-image: url(../img/esTable/search.png);
                .search-base-img();
            }
        }

        .submit-btn {
            border-radius: 2px;
            background: #0066FF;
            color: #fff;
            .search-base-btn();
        }

        .add-btn {
            .search-base-btn();
            background: #05B92F;

            .btn-img {
                .search-base-img();
                background-image: url(../img/esTable/add.png);
            }
        }

        .export-btn {
            .search-base-btn();
            background: #FB7B01;

            .btn-img {
                .search-base-img();
                background-image: url(../img/esTable/export.png);
            }
        }



        .transfers-btn {
            .search-base-btn();
            background: #FB7B01;

            .btn-img {
                .search-base-img();
                background-image: url(../img/esTable/tranfer.png);
            }
        }

        .refresh-btn {
            margin-top: 12px;
            margin-right: 10px;
        }

        // 其他按钮
        .other-btn {
            .search-base-btn();
            border: 1px solid #DADADA;
            box-sizing: border-box;
            background: #FBFBFB;
            color: #1F1F1F;

            i {
                margin-right: 8px;
            }
        }

        // 批量删除
        .deletes-btn {
            .search-base-btn();
            background: #ea5757;
            color: #fff;
        }

        .senior-search-btn {
            color: #0066FF;
            .search-base-btn()
        }
    }

    .unsetSearch {
        .btn-collection();
    }

    // 查询框
    .search {
        padding: 20px 30px;
        height: 32px;
        display: inline-flex;
        width: calc(100% - 60px);
        align-items: center;
        flex-wrap: wrap;

        .btn-collection();
    }

    //基础表格函数
    .base-table {
        position: absolute;
        top: 72px;
        bottom: 70px;
        left: 0;
        right: 0;
        padding: 0 30px;
        .base-body();
    }

    //有标签页的table
    .tabs-table {
        top: 142px;
        .base-table();
    }
}

.el-table thead {
    color: #424242 !important;
}

.el-table tr {
    font-size: 14px;
}

.el-table th.el-table__cell {
    background-color: #F3F6FB !important;
}

//分页
.pagination {
    position: absolute;
    bottom: 20px;
    right: 40px;

    .el-pagination.is-background .btn-next,
    .el-pagination.is-background .btn-prev,
    .el-pagination.is-background .el-pager li {
        background-color: #fff;
        border: 1px solid #DADADA;
        box-sizing: border-box;
        font-weight: 400;
        color: #424242;
    }

    .el-pagination.is-background .el-pager li:not(.disabled).active {
        background-color: #409eff;
        color: #fff;
    }
}

//通用-蓝色双圆
.cicle {
    width: 10px;
    height: 10px;
    background-color: #0066FF;
    border-radius: 20px;
    border: 10px solid rgb(217, 232, 255);
    display: inline-block;
    margin-right: 10px;
}

//通用-蓝色圆角矩形
.rectangle {
    width: 5px;
    height: 18px;
    background-color: #0066FF;
    border-radius: 13px;
    display: inline-block;
    margin-right: 10px;
}

.Cicle8px {
    width: 8px;
    height: 8px;
    background-color: #0066FF;
    border-radius: 20px;
    display: inline-block;
    margin-right: 2px;
    position: relative;
    top: -2px
}

//element-ui el-dialog重写
.dialog-title {
    font-family: 'PingFang SC';
    font-style: normal;
    font-weight: 500;
    font-size: 18px;
    line-height: 25px;
    color: #444444;
    display: flex;
    align-items: center;
    height: 60px;
    box-sizing: border-box;
    border-bottom: 1px solid #dadada;
    margin: 0 15px;
}

.el-dialog__body {
    padding-top: 20px;

    .search {
        padding: 20px 0;
    }

    .body {
        height: 320px;
        // overflow: auto;

        .base-body();

        // 如果是不分页的直接在这个标签下面放eltable
        .dialog-table {
            margin-top: 20px;
            height: calc(100% - 110px);
            position: relative;

            //如果分页再添加一个标签
            .paging-table {
                height: calc(100% - 50px);
            }
        }

        .pagination {
            bottom: 0;
        }

        //修改表单里面长度
        .el-form {
            .el-form-item__label {
                width: 140px;
            }

            .el-form-item__content,
            .el-select {
                width: 248px;
            }

            .el-form-item--small.el-form-item:last-of-type {
                margin-bottom: 0;
            }
        }
    }

    //dialog中存在标签页时
    .el-tabs__header {
        margin-bottom: 0;
    }

    .el-tabs__content {
        height: calc(100% - 41px);

        .el-tab-pane {
            height: 100%;
        }
    }

    //二级dialog
    .second-body {
        height: 410px;
        margin-bottom: 30px;
    }

    //底部-按钮功能行
    .tool-bar {
        text-align: right;
        margin-top: 20px;

        .dialog-base-btn {
            width: 80px;
            line-height: 40px;
            border-radius: 3px;
            box-sizing: border-box;
            text-align: center;
            cursor: pointer;
            display: inline-block;
        }

        // 增删查改-取消
        .cancel-btn {
            .dialog-base-btn();
            background: #FBFBFB;
            border: 1px solid #DADADA;
            color: #1F1F1F;
            line-height: 38px;
        }

        // 增删查改-确定
        .submit-btn {
            background: #0066FF;
            color: #FBFBFB;
            margin: 0 20px 0 10px;

            .dialog-base-btn();
        }
    }

}

//左树右表格结构
@treeDomWidth: 250px;

// 2.左树右表格页面
.tree-table {
    .left-dom {
        width: @treeDomWidth;
        position: absolute;
        left: @leftPadding;
        top: @topPadding;
        bottom: @topPadding;
        background-color: #fff;

        .title {
            height: 31px;
            font-size: 16px;
            font-weight: 600;
            color: #424242;
            background-color: #e6efff;
            display: flex;
            align-items: center;
            margin: 16px 20px;
            margin-bottom: 0;
        }

        .moveBtn {
            width: 10px;
            height: 100%;
            position: absolute;
            top: 0;
            right: 0;
            cursor: col-resize;

            .logo {
                background-color: rgb(183, 199, 244);
                width: 40%;
                height: 60px;
                border-radius: 5px;
                position: relative;
                /*脱离文档流*/
                top: 40%;
                /*偏移*/
                margin: 0 auto;
            }
        }

        .my-tree-dom {
            height: calc(100% - 40px);
            padding: 20px;
            padding-top: 5px;
            box-sizing: border-box;
        }
    }

    .right-dom {
        width: calc(100% - @treeDomWidth - @leftPadding * 3);
        bottom: @topPadding;
        position: absolute;
        right: @leftPadding;
        top: @topPadding;
        background-color: #fff;

        .tablePage {
            border: 0;
        }
    }
}

.header-query+.export-btn,
.header-query+.other-btn,
.header-query+.add-btn,
.header-query+.search-btn,
.search-input+.export-btn,
.myTimePicker+.export-btn,
.myTimePicker+.search-btn,
.search-input+.other-btn,
.search-input+.add-btn,
.search-input+.search-btn,
.search-input+.deletes-btn {
    margin-left: auto;
}

.download-template {
    background: linear-gradient(to bottom, #3388FF, #00A0E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: auto;
    margin-right: 40px;
    font-size: 14px;
    cursor: pointer;
}

.import-btn {
    .search-base-btn();
    border: 1px solid #DADADA;
    box-sizing: border-box;
    background: #FBFBFB;
    color: #1F1F1F;

    .btn-img {
        .search-base-img();
        background-image: url(../img/esTable/import.png);
    }
}

.my-popper {
    width: 400px !important;
}